<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../../common/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@include file="../../common/common-css.jsp"%>
 <%@include file="../../common/common-js.jsp" %>
       <%@include file="../../common/init.jsp" %>
       <script type="text/javascript">
       function allocation(){
           $.ajax({
          		async:false, //请勿改成异步，下面有些程序依赖此请数据
          		type : "POST",
          		data:{userId:"${user.userId}",roleId:$('input[name="roleId"]:checked').val()},
          		url: "${pageContext.servletContext.contextPath }/background/user/allocation.html",
          		dataType:'json',
          		success: function(json){
          			if(json == "1000"){
          			window.dialogArguments.location.reload();
    		          alert("分配成功！！");
    		          window.close();
                  	}else if(json == "1001"){
                  		alert("分配失败！！");
                    };
           		}
          	});
          }
       
       </script>
</head>

<body>
	<div style="height: 100%;overflow-y: auto;">
		<form
			action="${pageContext.servletContext.contextPath }/background/user/add.html"
			method="post" data-validator-option="{theme:'yellow_right_effect',stopOnError:true}">
<div class="right">
        	<div class="volume">
            	<img src="${pageContext.servletContext.contextPath }/images/toleft.png" style="margin:23px 0 0 2px;_margin:23px 0 0 0px;" />
            </div>
        	<div class="rightcon">
            	<div class="title">
                	您当前的位置：首页 >用户管理 > 添加用户
                </div>
                	<div class="titlecon">
                           	添加用户
                    </div>
                	<div class="addlist">
                        
                        	<table class="addlistcon" border="0" cellpadding="0" cellspacing="0">
                            	<tr>
                                	<td width="30%" align="right" class="odd"><span style="color:#900">*</span>用户名：
                                    </td>
                                    <td width="70%"  class="even">
                                   <input style="height: 20px;width: 200px" name="userName" type="text" data-rule="用户名:required;name;"/>*用户登录的名称
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>密码：
                                    </td>
                                    <td   class="even"> 
                                    <input style="height: 20px;width: 200px" name="userPassword" type="text" data-rule="密码: required;name;"/>*用户登录的密码
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>昵称：
                                    </td>
                                    <td   class="even"> 
                                    <input type="text" id="officeHours1" name="userNickname" style="height: 20px;width: 200px" data-rule="昵称: required;name;"/>
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>真实姓名：
                                    </td>
                                    <td   class="even"> 
                                    <input style="height: 20px;width: 200px" name="userRealname" type="text" data-rule="真实姓名: required;name;"/>
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>年龄：
                                    </td>
                                    <td   class="even"> 
                                    <input style="height: 20px;width: 200px" name="userAge" type="text" data-rule="年龄: required;name;"/>
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>性别：
                                    </td>
                                    <td   class="even"> 
                                    <input type="radio" name="userSex" value="男">男  
							           <input type="radio" name="userSex" value="女">女
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>地址：
                                    </td>
                                    <td   class="even"> 
                                    <input style="height: 20px;width: 200px" name="userAddress" type="text" data-rule="地址: required;name;"/>
                                    </td>
                                </tr>
                                <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>电话：
                                    </td>
                                    <td   class="even"> 
                                    <input style="height: 20px;width: 200px" name="userPhone" type="text" data-rule="电话: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>邮箱：
                                    </td>
                                    <td   class="even"> 
                                   <input style="height: 20px;width: 200px" name="userMail" type="text" data-rule="邮箱: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>QQ：
                                    </td>
                                    <td   class="even"> 
                                    <input style="height: 20px;width: 200px" name="userQQ" type="text" data-rule="QQ: required;name;"/>
                                    </td>
                                </tr>
                                 <tr>
                                	<td  align="right" class="odd"><span style="color:#900">*</span>级别：
                                    </td>
                                    <td   class="even"> 
                                    <input style="height: 20px;width: 200px" name="levels" type="text" data-rule="级别: required;name;"/>
                                    </td>
                                </tr>
                              </table> 
                             <div class="savere" style="float:center; margin-left:34%; _margin-left:17%;">
                               <input type="image" src="${pageContext.servletContext.contextPath }/images/baocun.png" width="101" height="46"/>
							        <a href="javascript:history.go(-1)" ><img src="${pageContext.servletContext.contextPath }/images/fanhui.png" width="101" height="46"></a>
                            </div>
                    </div><!--addlist-->
            </div><!--rightcon-->
        </div><!--right-->		</form>
	</div>
</body>
</html>
